home *** CD-ROM | disk | FTP | other *** search
- /* arexx Script
- */
-
- options results
- parse ARG Port b
-
- ADDRESS value Port
-
- pp_GetDepth
- D=result
- pp_GetWidth
- W=result
- pp_GetHeight
- H=result
-
- pp_CountFrames
- count=result
- IF count<2 then DO
- pp_Warn 'Make*an*Anim*first.'
- EXIT
- END
-
- pp_GetCurrentBuffer
- CBf=result
-
- if D<24 then DO
- pp_Psave "ram:palette.trash" 0
- END
-
- pp_FindEmptyBuffer
- flag=result
- if flag=-1 then DO
- pp_Warn "can't*find*empty|Buffer."
- EXIT
- END
-
- s0=1
- s1=Count
- ADDRESS value Port
- pp_DialogInit 250 80 "*Clone*Anim*" 2
- pp_Slider 0 100 5 100 16 "First*Frame*#" 1 1 count s0
- pp_Slider 1 100 25 100 16 "Last*Frame*#" 1 1 count s1
- pp_Dialog
- rc=result
- IF rc=0 THEN DO
- EXIT
- END
-
- pp_GetDialog 0
- s0=result
-
- pp_GetDialog 1
- s1=result
-
- pp_GotoFrame s0
-
- pp_SetBuffer flag
- pp_GetWidth
- if result~=0 then DO
- pp_Request "This*Buffer*is*not*empty.|Do*you*want*to*erase*it*?"
- if result=0 then DO
- EXIT
- END
- ELSE DO
- pp_ClearCurrentBuffer
- END
- END
-
- pp_new W H D
- pp_GetWidth
- IF result=0 then DO
- pp_Warn "Not*enough*memory."
- EXIT
- END
-
- IF D<24 then DO
- pp_Pload "ram:palette.trash"
- ADDRESS COMMAND
- 'delete >nil: ram:palette.trash'
- ADDRESS value Port
- END
-
- pp_AnimGui 1
- IF result<2 then DO
- EXIT
- END
-
- pp_MakeAnim (s1-s0)+1
- pp_CountFrames
- Count=result
- IF Count<2 then DO
- pp_Warn "Can't*create*animation."
- EXIT
- END
-
- pp_GotoFrame 1
- pp_progresstext 'Cloning...'
- DO i=1 to Count
- F=s0+(i-1)
- pp_Progress i Count
- pp_CopyAnimFrame CBf flag F i
- END
- pp_Progressclr
-
- pp_GotoFrame 1
-
- EXIT
-
-
-
-
-
-